package com.ligy.web;

import javax.servlet.http.HttpServletRequest;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.ligy.model.ResultModel;

@RestController
public class SampleController {
	
	@RequestMapping("/hello")
    String home() {
        return "Hello World!";
    }
	
	@RequestMapping("/getData")
	ResultModel<String> getData(HttpServletRequest request) {
		String accesstoken = request.getHeader("access_token");
		System.err.println(accesstoken);
		ResultModel<String> result = new ResultModel<String>();
		result.setSuccess("success");
		result.setMsg("成功");
		result.setData("我就是数据");
        return result;
    }

}
